import thenFs from 'then-fs'

const promiseAll = [
    thenFs.readFile('./files/one.txt', 'utf8'),
    thenFs.readFile('./files/two.txt', 'utf8'),
    thenFs.readFile('./files/three.txt', 'utf8')
]

Promise.all(promiseAll)
    .then((res) => {
        console.log(res)
    })
    .catch((err) => {
        console.log(err)
    })

Promise.race(promiseAll)
    .then((res) => {
        console.log(res)
    })
    .catch((err) => {
        console.log(err)
    })
